package com.innovation.chengzhangriji.ui.event;

public class BaseEvent {

    /**
     * 日记同步
     */
    public static final int TYPE_TIMELINE_SYNC = 1;

    /**
     * 日记加载更多
     */
    public static final int TYPE_TIMELINE_LOAD_MORE = 2;

    /**
     * 检查日记评论
     */
    public static final int TYPE_CHECK_NEW_COMMENT = 3;

    /**
     * 宝宝信息同步
     */
    public static final int TYPE_SYNC_BABY_INFO = 4;

    /**
     * 新评论下载成功
     */
    public static final int TYPE_NEW_COMMENT_DOWNLOAD_SUCCESS = 5;

    /**
     * 新通知
     */
    public static final int TYPE_NEW_NOTIFICATION = 6;

    /**
     * 加载宝宝关注人信息
     */
    public static final int TYPE_LOAD_BABY_PARENT = 7;

    /**
     * 日记本查看范围改变
     */
    public static final int TYPE_RANGE_CHANGED = 8;

    /**
     * 宝宝取消关注
     */
    public static final int TYPE_BABY_DELETED = 9;

    /**
     * 宝宝的权限改变
     */
    public static final int TYPE_PERMISSION_CHANGED = 10;

    /**
     * 日记发表失败
     */
    public static final int TYPE_SEND_DIARY_FAILURE = 11;

    /**
     * 权限变化
     */
    public static final int TYPE_PERMISSION_GRANTED = 12;

    /**
     * 登录状态改变
     */
    public static final int TYPE_LOG_STATE_CHANGED = -1;

    public BaseEvent() { }

    public BaseEvent(int type) {

        this.type = type;
    }

    /**
     * 成功
     */
    public static final int STATE_SUCCESS = 10000;

    /**
     * 失败
     */
    public static final int STATE_FAILURE = 10001;

    /**
     * Token Error
     */
    public static final int STATE_TOKEN_ERROR = 10002;

    /**
     * 事件类型
     */
    private int type;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    /**
     * 事件状态
     */
    private int state;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 事件消息内容
     */
    private String message;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
